package com.lt.threadTest.JRUDTest;

/**
 *volatile 作用
 *  1
 *
 */
public class ExecutorTest {

    /**
     * 当参数不加
     */
//    private static volatile boolean running = true;
    private static boolean running = true;
    public static void main(String[] args) throws InterruptedException {

        new Thread(new Runnable() {
            @Override
            public void run() {
                while (running)   {

                }
                System.out.println("Server end");
            }
        },"server").start();
        Thread.sleep(1000);
        running = false;
    }
}
